/* 
 * Since 2008 - 2012
 */

package com.hh.bss.project.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import com.hh.bss.base.*;
import com.hh.bss.common.page.*;
import com.hh.bss.project.dao.*;
import com.hh.bss.project.entity.*;
import com.hh.bss.project.service.*;
import com.hh.bss.project.vo.query.*;



@Service
@Transactional
public class CustomerPartnerServiceImpl extends BaseBusinessService<CustomerPartner, java.lang.Integer> implements CustomerPartnerService<CustomerPartner, java.lang.Integer> {

	@Autowired
	private CustomerPartnerDao customerPartnerDao;

	public EntityDao getEntityDao() {
		return this.customerPartnerDao;
	}

	@Transactional(readOnly = true)
	public Page findPage(CustomerPartnerQuery query) {
		return customerPartnerDao.findPage(query);
	}

	/**
	 * 检查 是否存在 相同的记录 及 account 和 role 一样
	 */
	@Override
	public boolean checkSameRoleAndAccount(CustomerPartner customerPartner) {

		return customerPartnerDao.checkSameRoleAndAccount(customerPartner);
	}

	@Override
	public boolean validateOfferPartner(CustomerPartner customerPartner) {
		// TODO Auto-generated method stub
		return customerPartnerDao.validateOfferPartner(customerPartner);
	}

	@Override
	public boolean isExistMCRoleByJobId(Integer apId) {
		// TODO Auto-generated method stub
		return customerPartnerDao.isExistMCRoleByJobId(apId);
	}

}
